#ifndef SOCKS5_ACTION_H
#define SOCKS5_ACTION_H
#pragma once

#include <KSocketAction.h>

class KIAddress;
class S5Server;

class S5Action : public KSocketAction {
public:
    virtual bool isProxy() const { return false; }
    virtual void relay(const void *data, size_t length, const KIAddress *dest);
protected:
    S5Server *server() const;
protected:
    void onPeerRelayed();
    void onReceived(KKey *&key, void *data, size_t length, bool more);
    void onSent(KKey *&key, void *data, size_t length);
    friend class S5ActionClient;
};

#endif // SOCKS5_ACTION_H